Skip to content

Conversation

@ckastner
Copy link
Collaborator

@ckastner ckastner commented Aug 4, 2025

This can be used by distributions to specify where to look for backends when ggml is built with GGML_BACKEND_DL=ON.

I looked at how a number of other Debian packages solve this, and the pattern always seems to be some form of /usr/lib/<triplet>/<projectname>/backends/, or plugins/ or some variation thereof. With this option, distros can pick whatever fits them best.

This can be used by distributions to specify where to look for backends
when ggml is built with GGML_BACKEND_DL=ON.
@github-actions github-actions bot added the ggml changes relating to the ggml tensor library for machine learning label Aug 4, 2025
option(GGML_BACKEND_DL "ggml: build backends as dynamic libraries (requires BUILD_SHARED_LIBS)" OFF)
option(BUILD_SHARED_LIBS "ggml: build shared libraries" ${BUILD_SHARED_LIBS_DEFAULT})
option(GGML_BACKEND_DL "ggml: build backends as dynamic libraries (requires BUILD_SHARED_LIBS)" OFF)
set(GGML_BACKEND_DIR "" CACHE PATH "ggml: target directory for dynamic libraries (requires GGML_BACKEND_DL")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
set(GGML_BACKEND_DIR "" CACHE PATH "ggml: target directory for dynamic libraries (requires GGML_BACKEND_DL")
set(GGML_BACKEND_DIR "" CACHE PATH "ggml: directory to load dynamic backends from (requires GGML_BACKEND_DL)")

@ckastner ckastner merged commit 4161343 into ggml-org:master Aug 4, 2025
45 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants